<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/theme/atom-one-dark.css">
        <title>例子18-JS进阶（二）</title>
    </head>
    <body>
        <pre>
            <code>
                    // 例子18

                    var foo = function() {}  // 赋值
                    function fn(num, callback) { // 函数作为参数
                        callback();
                        //...
                    }

                    // 函数作为返回值
                    function bar() {
                        return function() {
                            //... ...
                        }
                    }
            </code>
        </pre>
        <script src="scripts/libs/highlight.pack.js"></script>
        <script src="scripts/18.js"></script>
        <script>
            hljs.initHighlightingOnLoad();
        </script>
    </body>
</html>